<?php
/*
	
*/
defined('BY_JYA') or exit('Access Denied');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	$setting=$return['pluginset'];
	$return['banner']=$setting['hdps'];
	$return['setting']=$setting;
	$return['params']=array();
	$return['list']=array();
	$return['sharedata']=array(
		'title'=>$setting['share_title'],
		'desc'=>$setting['share_desc'],
		'link'=>custom_url('jy_saleapp/index/list',true),
		'imgUrl'=>ATTACHMENT_URL.$setting['share_image'],
	);
	set_html('title',$setting['title']?:'首页');
	exi($return);
}
if($_RQ['op']=='list'){
	$params=array('uniacid'=>$_SESSION['uniacid'],'status'=>'1');
	if($_RQ['keyword']){
		$params['title like']='%'.trim($_RQ['keyword']).'%';
	}
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$total='';
	$list=$this->pdo_getslice('list',$params,array($pindex,$psize),$total,'','','paixu desc');
	foreach($list as &$item){
	}
	$return['list']=$list;
	exi($return);
}
